package com.woniuxy.special.controller;


import com.woniuxy.special.common.Result;
import com.woniuxy.special.service.SysUserInfoService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RestController;

import javax.servlet.http.HttpServletResponse;

/**
 * <p>
 *  用户管理接口
 * </p>
 *
 * @author 吴彦祖
 * @since 2025年04月07日
 * 用户类型：1-特派员，2-管理员，3-普通用户
 * @TableField("LOGIN_NAME")
 *     private String loginName;
 *
 *     @TableField("LOGIN_PWD")
 *     private String loginPwd;
 *
 *     @TableField("TYPE")
 *     private String type;
 */
@RestController
@RequestMapping("/sysUserInfo")
public class SysUserInfoController {
    @Autowired
    private SysUserInfoService sysUserInfoService;

    //用户登录
    @PostMapping("/login")
    public Result login(String loginName, String loginPwd, String type, HttpServletResponse response) {
        return Result.success("登录成功",sysUserInfoService.login(loginName,loginPwd,type,response));
    }

}

